﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace ApocDev.TownsApi.XmlFiles
{
    public interface IChangedXml
    {
        /// <summary>
        /// Determines whether this XML file element is "dirty" and should be saved.
        /// </summary>
        bool IsDirty { get; }
        /// <summary>
        /// Saves the full XML for this element.
        /// </summary>
        /// <returns></returns>
        XElement Save();
        /// <summary>
        /// Saves only the "dirty" parts of the XML for this element
        /// </summary>
        /// <returns></returns>
        XElement SaveDirty();
    }
}
